package pojo;

import java.util.Objects;

/**
 * 功能描述: 用户信息-堆信息使用
 * 2024/05/18
 * <p>
 * ZhangYi
 */
public class UserVO {

    private String userId;
    private String userName;

    private String nickName;

    public UserVO(String userId,
                  String userName) {
        this.userId = userId;
        this.userName = userName;
    }

    public UserVO(String userId,
                  String userName,
                  String nickName) {
        this.userId = userId;
        this.userName = userName;
        this.nickName = nickName;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId='" + userId + '\'' +
                ", userName='" + userName + '\'' +
                ", nickName='" + nickName + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        UserVO user = (UserVO) o;
        return Objects.equals(userId,
                              user.userId) && Objects.equals(userName,
                                                             user.userName);
    }


    public boolean equalsValue(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        UserVO user = (UserVO) o;
        return Objects.equals(userId,
                              user.userId);
    }
    @Override
    public int hashCode() {
        return Objects.hash(userId);
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
}
